import java.util.Random;
import java.io.OutputStream;
import java.io.IOException;

public class FileDump {
	private OutputStream out;
	private Random random;
	public FileDump(OutputStream out) {
		this.out = out;
		this.random = new Random();
	}
	public long dump(int filesize) throws IOException {
		int c;
		long startTime = System.currentTimeMillis();
		for(int i=0; i < filesize; i++) {
			c = 65 + random.nextInt(26);
			this.out.write(c);
		}
		return (System.currentTimeMillis() - startTime);
	}
}
